<!DOCTYPE html>
<!--HTML5 doctype-->
<html>

<head>

  <title>悠悠泊车</title>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, minimal-ui">
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />

  <link rel="stylesheet" type="text/css" href="css/jsmo/af.ui.css" />
  <link rel="stylesheet" type="text/css" href="css/jsmo/icons.css" />
  <link rel="stylesheet" type="text/css" href="css/pro.css" />

  <script type="text/javascript" charset="utf-8" src="js/contants.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/jsmo/jquery-2.1.4.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/jsmo/fastclick.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/jsmo/appframework.ui.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/jsmo/custom.storage.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/jsmo/json2.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/parking.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/settings.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/loginjs.js"></script>
  <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=VGThN7uLK691AqBaBgpLbxyV"></script>

  <script>

    $.afui.useOSThemes=false;
    $.afui.loadDefaultHash=true;
    $.afui.autoLaunch=false;

    //check search
    var search=document.location.search.toLowerCase().replace("?","");
    if(search.length>0)
    {

       $.afui.useOSThemes=true;
        if(search=="win8")
            $.os.ie=true;
        else if(search=="firefox")
            $.os.fennec="true"
        $.afui.ready(function(){
            $(document.body).get(0).className=(search);
        });
    }

    $(document).ready(function(){
      setTimeout(function(){
        $.afui.launch();

      },1300);

      setTimeout(function(){
        if (window.localStorage){
          var carman=localStorage.getItem("loginInfo");
          if(carman){
            $("#username").html(carman.toString());
          }else{
        	  $("#username").click();
          }
          isShowSpacialCar();
        }

        $("#parktable").find("input").on('keyup',function(){
        	getParkingInfo($(this));
          //nextInput($(this));
        })
        
        function  CaretAtEnd(field){  
        	   if(field.createTextRange){  
        	       var r= field.createTextRange();  
        	       r.moveStart('character', field.value.length);  
        	       r.collapse();  
        	       r.select();//加上这一句是使文本框里的文字为选中状态  
        	   }  
        	}  

        var map = new BMap.Map('container');//指向map的容器
        map.centerAndZoom(new BMap.Point(118.080, 24.566), 13);  // 初始化地图,设置中心点坐标和地图级别
        map.addControl(new BMap.MapTypeControl());   //添加地图类型控件
        map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
      },1390);
    });
    //if($.os.ios)
        $.afui.animateHeader(true);

    </script>
</head>
<body>

  <div id="splashscreen" class='ui-loader'>
    <section id="pl" class="park-takeover-minimulti park-size">
      <i class="park-size-image" data-size-image-fixed="true" data-size-image-fade="true" data-size-min-opacity=".3" style="opacity: 1.05;">
      </i>
    </section>
    <!--<img src='img/loginpage.png' class="loginlogo" alt="悠悠泊车" />-->
  </div>

  <div class="view active" id="mainview">
      <header id="mainheader">
        <a id="menubadge" data-left-menu="leftMenu" class='menuButton left'><img src="./img/first/settings.png" class="imglabel"></a>
        <h1 class="labelp"><img src="./img/logo120.png" class="imglabel">&nbsp;&nbsp;悠悠泊车</h1>
      </header>
      <div class="pages">

         <!-- ******************  Tab View Pages   ******************-->
        <div class="panel" id="main" >
          <br/>
          <br/>
          <p class="labelp"><img src="./img/first/parkingnolb.png" class="imglabel">&nbsp;&nbsp;输入泊车编号</p>
          <br/>
          <div>
            <table id="parktable">
              <tr>
                <!--onkeydown="return isNumber(event,this);"-->
                <td><input class="parkinput" maxLength="1" min="0" max="9" pattern="[0-9]*" cov="false" onkeydown="return isNumber(event,this);" type="number" id="parkno1"/></td>
                <td><input class="parkinput" maxLength="1" min="0" max="9" cov="false" onkeydown="return isNumber(event,this);" type="number" id="parkno2"/></td>
                <td><input class="parkinput" maxLength="1" min="0" max="9" cov="false" onkeydown="return isNumber(event,this);" type="number" id="parkno3"/></td>
                <td><input class="parkinput" maxLength="1" min="0" max="9" cov="false" onkeydown="return isNumber(event,this);" type="number" id="parkno4"/></td>
                <td><input class="parkinput" maxLength="1" min="0" max="9" cov="false" onkeydown="return isNumber(event,this);" type="number" id="parkno5"/></td>
                <td><input class="parkinputno" maxLength="1" min="0" max="9" cov="false" onkeydown="return isNumber(event,this);" type="number" id="parkno6"/></td>
              </tr>
            </table>
          </div>
          <br/>
          <br/>
          <p class="labelp" ><img src="./img/first/parkingtime.png" class="imglabel">&nbsp;&nbsp;停车时长</p>
          <br/>
          <table class="timeselecttable">
            <tr>
              <td><a id="hourplus" href="#" onclick="plushour()"><img src="./img/first/plus.png" class="leftimg" /></a></td>
              <td><a id="mintplus" href="#" onclick="plusmint()"><img src="./img/first/plus.png" class="rightimg" /></a></td>
            </tr>
          </table>
          <br/>
          <hr/>
          <table class="timeoptiontable">
            <tr>
              <td width="50%"><p id="hours" class="leftp">00</p></td>
              <td width="50%"><p id="mints" class="rightp">00</p></td>
            </tr>
          </table>
          <hr/>
          <br/>
          <table class="timeselecttable">
            <tr>
              <td><a id="hoursub" href="#" onclick="subhour()"><img src="./img/first/subtract.png" class="leftimg" /></a></td>
              <td><a id="mintsub" href="#" onclick="submint()"><img src="./img/first/subtract.png" class="rightimg" /></a></td>
            </tr>
          </table>
          <br/>
          <div style="height:4%"></div>
          <div class="">
            <div class="costlabel">
              <font class="fontcl" >应付停车位:</font><font id="cost" class="fontcl1"> ￥0.00</font>
              <input id="totalFee" type="hidden"/>
            </div>
            <div style="height:10px"></div>
            <div class="buttoncenter" id="bc"><a href="#" onclick="comfirmOrderVal()">确认</a></div>
            <a id="comfirmO" href="#comfirmparking" style="display:none"></a>
          </div>
          <input class="backmemucon" value="false" type="hidden"/>
        </div>

        <!-- ****************** comfirmparking panel ****************** -->
        <div class="panel" id="comfirmparking">
          <div class="ordetail" >订单详情</div>
          <table class="ornoline">
            <tr>
              <td class="ortd">订单编号</td>
              <td id="tdOrderNo" class="orno"></td>
            </tr>
          </table>
          <table class="ornoline">
            <tr class="ortr">
              <td class="ortd">路段名称</td>
              <td id="OrderLineName" class="orno">软件园二期</td>
            </tr>
            <tr class="ortr">
              <td class="ortd">泊位编号</td>
              <td id="orderPakingNo" class="orno">123456</td>
            </tr>
            <tr class="ortr">
              <td class="ortd">泊位价格</td>
              <td id="orderParkingPrice" class="orno">6元/小时</td>
            </tr>
          </table>
          <table class="ornoline">
            <tr class="ortr">
              <td class="ortd">停车时间</td>
              <td id="orderParkingTime" class="orno">2015-6-25  12:00:00</td>
            </tr>
            <tr class="ortr">
              <td class="ortd">购买时间</td>
              <td id="orderTime" class="orno">1小时</td>
            </tr>
            <tr class="ortr">
              <td class="ortd">停车费用</td>
              <td id="orderTotalFee" class="orno">￥5</td>
            </tr>
          </table>
          <div class="ordetail" >选择支付方式</div>
          <table class="paymethod">
            <tr class="ortr">
              <td class="ortd"><img src="./img/first/taobaopay.png" class="payimg" /></td>
              <td class="payno">支付宝支付</td>
              <td class="ortd"><img src="./img/first/unselected.png" class="payimg" /></td>
            </tr>
          </table>
          <table class="paymethod">
            <tr class="ortr">
              <td class="ortd"><img src="./img/first/wechatpay.png" class="payimg" /></td>
              <td class="payno">微信支付</td>
              <td class="ortd"><img src="./img/first/selected.png" class="payimg" /></td>
            </tr>
          </table>
          <br/>
          <div style="height:4%"></div>
          <div class="buttoncenter"><a href="#comfirmPay" onclick="goToComfirmPayPage();">确认支付</a></div>
        </div>

        <!-- ****************** comfirmPay panel ****************** -->
        <div class="panel" id="comfirmPay">
          <div class="compbg">
            <p class="labelp"><img id="payResultImg" src='./img/messagesucc.png' /></p>
            <p class="comfont" id="payResultContent">支付处理中...</p>
            <p id="comCost" class="comCost"></p>
          </div>
          <br/>
          <div class="buttoncenter" id="payCompleteBtn"><a id="comPay" href="#main" onclick="comPayGoBackMain();" >结束</a></div>
        </div>

        <!-- ****************** find parking  panel ****************** -->
        <div class="panel" id="findparking" >
          <div style="width:100%;height:100%;border:1px solid gray" id="container"></div>

        </div>

        <!-- ****************** login panel ******************  -->
        <div class="panel" id="login" >
          <br/>
          <br/>
          <p class="labelp"><img src="./img/logo.png" class="imglabel"></p>
          <br/>
          <div class="input-group">
             <input type="tel" id="lgphoneno" class="imgphone" placeholder="手机号码">
             <input type="password" id="lgpassword" class="imgps" placeholder="密码">
          </div>
          <br/>
          <div class="buttoncenter" onclick="loginfn();">登录</div>
          <a id="loginn" href="#main" style="display:none"></a>
          <br/>
          <br/>
          <table class="regaforg">
            <tr>
              <td class="righth"><a class="reg" id="reg" href="#regs" onclick="goToRegsPage();">注册帐号</a></td>
              <td><a class="forg" id="forg" href="#1" >忘记密码</a></td>
            </tr>
          </table>
          <br/>
          <br/>
          <br/>
          <br/>
          <div style="height:7%"></div>
          <div class="other">
            <table class="otherm">
              <tr>
                <td class="htd1"><hr/></td>
                <td class="htd2">其他登录方式</td>
                <td class="htd3"><hr/></td>
              </tr>
            </table>
            <div style="height:10px"></div>
            <table class="otheri">
              <tr>
                <td class="htd1"><img src="./img/wechat.png" class="otheri1"/></td>
                <td class="htd2"><img src="./img/qq.png" class="otheri2"/></td>
                <td class="htd3"><img src="./img/sina.png" class="otheri3"/></td>
              </tr>
            </table>
          </div>
        </div>


        <!-- ****************** register panel ****************** -->
        <div class="panel regs" id="regs">
          <input type="text" class="regi1" id="regphoneno" placeholder="输入手机号码">
          <input type="text" class="regi2" id="regvalidation" placeholder="输入验证码"><a class="rega" onclick="getValCodeFun();">获取验证码</a>
          <input type="hidden"  id="regvalh">
          <input type="password" id="regpassword" placeholder="输入登录密码(6-16位字符)">
          <img src="./img/logo.png" class="comimg" /><font> 我已阅读并同意</font><font class="fontcom"> 《悠悠泊车服务协议》</font>
          <br/>
          <br/>
          <div class="buttonreg"><a href="#" onclick="registerFn();">注册</a></div>
          <a href="#regp" id="regsn" onclick="goToRegsPerPage();" style="display:none"></a>
        </div>

        <!-- ****************** register personal panel ****************** -->
        <div class="panel regs" id="regp">
          <input type="text" id="namen" class="regi1" placeholder="姓名">
          <input type="text" id="sex" class="regp" placeholder="性别">
          <input type="text" id="carNo" class="regp" placeholder="车牌号">
          <input type="text" id="engNo" class="regp" placeholder="发动机号">
          <br/>
          <br/>
          <div class="buttonreg"><a href="#" onclick="updateInfoFn();">提交</a></div>
          <a href="#main" onclick="goToParking();" id='ingoreButton' style="display:none" ></a>
        </div>

      </div>

      <footer id="mainfooter" class="ft">
          <a href="#main" id="tab1" >我要停车</a>
          <a href="#findparking" id="tab2">找车位</a>
      </footer>

      <nav id="leftMenu" style="z-index:5" class="nwidth">
        <div class="view active" id="navView2">
            <div class="pages">
                <div class="panel active" id="navSettings" data-title="settings">
                  <div class="logoaccount">
                    <br/>
                    <br/>
                    <p class="labelp"><img src="./img/settings/logo.png" class="logoplogo" /></p>
                    <br/>
                    <p class="labelp"><a class="loginP" href="#login" id="username" onclick="goToLoginPage();">未登录</a></p>
                  </div>
                  <br/>
                  <ul class="list borderw">
                   <li class="setli bordert"><a href="#main"><img src="./img/settings/overtimelb.png" class="seticon" >&nbsp;&nbsp;超时补缴</a></li>
                   <li class="setli borderw"><a><img src="./img/settings/parkinghtlb.png" class="seticon" >&nbsp;&nbsp;停车记录</a></li>
                   <li class="setli"><a><img src="./img/settings/modifypw.png" class="seticon" >&nbsp;&nbsp;修改密码</a></li>
                   <li class="setli"><a><img src="./img/settings/userresp.png" class="seticon" >&nbsp;&nbsp;用户反馈</a></li>
                   <li class="setli borderw"><a><img src="./img/settings/about.png" class="seticon" >&nbsp;&nbsp;关于我们</a></li>
                  </ul>
                  <div style="height:15%" />
                  <a a href="#" onclick="logoutFn()"  class="button center"><img src="./img/settings/exit.png" class="seticon" />&nbsp;&nbsp;退出登录</a>
                  <a href="#main" id='logoutn' style="display:none" ></a>
                  </div>
                </div>
            </div>
        </div>
      </nav>
      
      <nav id="topMenu" style="z-index:5" class="swidth">
        <div class="view active" id="navView2">
            <div class="pages">
                <div class="panel active" id="specialPanl" data-title="settings">
                  <br/>
                  <h1 id="specialLine">软件园二期停车场</h1>
                  <p id="specialLineDetail">详细地址&nbsp;思明区软件园二期</p>
                  <hr/>
                  <p id="specialLineDetail">选择泊位编号</p>
                  <div id="specailNumber" class="specailNumber"></div>
                  <br />
                  <div style="text-align: center;">
                  	<a style="margin-left: 20px;text-decoration: none;color: #eeb71c;" href="#" onclick="vipOperation('2')">升锁</a>
           				
                    <a style="margin-left: 20px;text-decoration: none;color: #eeb71c;"   href="#" onclick="vipOperation('1')">降锁</a>
                  </div>
                  
            </div>
        </div>
      </nav>

  </div>

<!--    <script type="text/javascript" src="cordova.js"></script> -->
<!--         <script type="text/javascript" src="js/index.js"></script> -->
        <script>
        	var preId = "";
        	function callPlugins() {
        		navigator.maxplugins.hello('NDljY2E1ZGM4NzUzM2U3Yg==,order,5740');
        	}
        	
        	function createPreId() {
        		weixin.plugins.createPreId('weixin');
        	}
        	
        	function payPreId() {
        		weixin.plugins.payPreId(preId);
        	}
        	

        </script> 
</body>
</html>
